package com.bean.dangBean;

import java.io.Serializable;

/**
 * 用户实体
 * @author DELL
 *
 */
public class Employee implements Serializable {

	/** 用户编号 */
	private Integer id;
	/** 用户账号 */
	private String userName;
	/** 用户密码 */
	private String password;
	/** 用户姓名 */
	private String realName;
	/** 用户性别 */
	private Integer sex;
	/** 用户角色 */
	private Integer roleId;
	/** 用户工资 */
	private String salary;
	/** 角色名称 */
	private Role role;


	public Employee() {
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	public Integer getRoleId() {
		return roleId;
	}

	public void setRoleId(Integer roleId) {
		this.roleId = roleId + 1;
	}

	public String getSalary() {
		return salary;
	}

	public void setSalary(String salary) {
		this.salary = salary;
	}

	public Employee(String userName, String password, String realName, Integer sex, Integer roleId, String salary) {
		this.userName = userName;
		this.password = password;
		this.realName = realName;
		this.sex = sex;
		this.roleId = roleId;
		this.salary = salary;
	}

	public Employee(String userName, String password) {
		this.userName = userName;
		this.password = password;
	}

	@Override
	public String toString() {
		return "Employee{" +
				"id=" + id +
				", userName='" + userName + '\'' +
				", password='" + password + '\'' +
				", realName='" + realName + '\'' +
				", sex=" + sex +
				", roleId=" + roleId +
				", salary='" + salary + '\'' +
				'}';
	}
}
